Skip to main content

Scout Location

The scout endpoint allows a pilgrim to scout a specific location to find other colonies or caches. The pilgrim must be within one coordinate point of the target location; otherwise, an error will be returned.

Endpoint

POST /pilgrims/:id/scout

Parameters

  • id (path): The unique identifier of the pilgrim who will be scouting.

Request Body

The request body should contain the target coordinates that the pilgrim will scout.

Request Body Example

{
"x": 10,
"y": 15
}
FieldTypeDescription
xintThe X coordinate of the target location.
yintThe Y coordinate of the target location.

Response

On success, the endpoint returns a Cache object for the scouted location, including details such as the cache's name, type, and survival rating. If the pilgrim is too far from the location, an error message will be returned.

Response Example

{
"status": "success",
"message": "scouted location with pilgrim",
"data": {
"id": "cache123",
"name": "Ancient Cache",
"type": "relic",
"location": {
"x": 10,
"y": 15
},
"survivalRating": 0.85,
"rewardsItems": [
{
"id": "item456",
"name": "Mysterious Relic",
"type": "artifact",
"faithValue": 50,
"rarity": 10,
"quantity": 1
}
],
"expiryDate": "2024-12-31T23:59:59Z",
"discoveredBy": "user123",
"visitedBy": ["user123", "user456"]
}
}
FieldTypeDescription
idstringThe unique identifier of the cache.
namestringThe name of the cache.
typestringThe type of the cache, e.g., "relic".
locationobjectThe coordinates of the cache location.
survivalRatingfloatThe chance of survival for this location.
rewardsItemsarrayList of items found in the cache.
expiryDatedatetimeThe expiration date of the cache (if any).
discoveredBystringID of the user who discovered the cache.
visitedByarrayList of IDs of pilgrims who have visited the cache.

Error Responses

  • 400 Bad Request: Returned if the pilgrim is too far away from the target location.